<template>
  <div id="app">
    <Topserch />
    <router-view></router-view>
    <Player v-if="currentID != null"/>
    <Gotop />
    <Footer />
  </div>
</template>

<script>
import Vue from "vue";
import Topserch from "./components/Topserch";
import Player from "./components/player/Player";
import Gotop from "./components/Gotop";
import Footer from "./components/Footer";
import {mapState} from 'vuex'
export default {
  name: "App",
  components: {
    Topserch,
    Player,
    Gotop,
    Footer,
  },
  computed:{
    ...mapState('song',['currentID'])
  },
  beforeCreate() {
    Vue.prototype.$bus = this; //安装全局事件总线，$bus就是当前应用的vm
  },
};
</script>

<style>
* {
  font-family: Helvetica Neue, Arial, sans-serif;
}
</style>
